package org.adorsys.aderp.cash.work.parser;

import java.io.IOException;
import java.io.InputStream;

import org.apache.tika.exception.TikaException;
import org.apache.tika.metadata.Metadata;
import org.apache.tika.parser.ParseContext;
import org.apache.tika.parser.pdf.PDFParser;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;


public class SimpleReceiptParser {

	private InputStream stream;
	private ContentHandler handler;
	private Metadata metadata;
	private ParseContext context;

	public void doParse(){
		try {
			PDFParser pdfParser = new PDFParser();
			pdfParser.parse(stream, handler, metadata, context);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SAXException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (TikaException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
